/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Image,
  Dimensions,
  Alert,
  Modal,
  TouchableHighlight,
  TextInput,
  ScrollView
} from 'react-native';

var Header = require("./Component/Header");
var ListItem = require("./Component/ListItem");
var Dialog = require("./Component/Dialog");

var _navigator;
class PersonInfo extends Component {
	constructor(props) {  
		super(props);
		
		_navigator = this.props.navigator;
		
		this.state = {modalVisible: false};
  	}
	
	setModalVisible(visible) {
    	this.setState({modalVisible: visible});
  	}
	
	_ListClick(i){
		
	}
	
	render() {
		let item=['设置','修改密码','退出登录','我的收藏'];
		let icon=['twitter-square','facebook-square','twitter-square','twitter-square','twitter-square','twitter-square'];
		
	    return (
	      	<View style={styles.container}>
			    <Header name="个人中心" IconLeft="chevron-left" onPressLeft={()=>_navigator.pop()}/>
		      	<ScrollView>
		      		<Image source={require('./image/myinfo/background.jpg')} style={styles.bgImage}>
			      		<View style={styles.personInfo}>
			      			<Image source={require('./image/common/girl.jpg')} style={styles.header}/>
			      		</View>
			      		<View>
			      			<ListItem 
			      				name={item}
			      				icon={icon}
			      				callBackFunc={(i)=>{this._ListClick(i)}}/>
			      		</View>
	      			</Image>
	      		</ScrollView>
	      	</View>
	    );
	}
}

const styles = StyleSheet.create({
	bgImage:{
		width:Dimensions.get('window').width,
		height:Dimensions.get('window').height
	},
	container: {
	    flex: 1,
	    backgroundColor: '#F5FCFF',
	},
	personInfo:{
		height:200,
    	justifyContent: 'center',
    	alignItems: 'center',
	},
	personpara:{
		flex:1,
    	justifyContent: 'center',
    	alignItems: 'center',
	},
	list:{
		height:50,
		width:Dimensions.get('window').width,
	},
	header:{
		width:100,
		height:100,
		borderRadius:50
	},
});

module.exports = PersonInfo;
